home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / chichi.swf / scripts / frame_235 / PlaceObject2_160_50 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2008-09-26  |  314 b   |  16 lines

  1. onClipEvent(enterFrame){
  2.    if(active)
  3.    {
  4.       xdif = targetx - _X;
  5.       _X = _X + xdif / 8;
  6.       ydif = targety - _Y;
  7.       _Y = _Y + ydif / 8;
  8.       if(Math.abs(xdif) < 0.2 && Math.abs(ydif) < 0.2)
  9.       {
  10.          _X = targetx;
  11.          _Y = targety;
  12.          active = false;
  13.       }
  14.    }
  15. }
  16.